package io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class ReadDemo {
    public static void main(String[] args) {
        File file = new File("dome.txt");
        long lg = file.length();
        try(
                FileInputStream fis = new FileInputStream(file)
        ) {
            byte [] be = new byte[(int)lg];
            fis.read(be);
            String line = new String(be, StandardCharsets.UTF_8);
            System.out.println(line);
        } catch (IOException e) {}
    }
}

